<template>
  <el-dialog v-model="dialogVisible" title="个人信息" width="500px" draggable>
    <el-form>
      <el-form-item label="用户名">{{ userInfo.name }}</el-form-item>
      <el-form-item label="用户角色">{{ userInfo.roleName }}</el-form-item>
      <el-form-item label="所属地">{{ userInfo.belong }}</el-form-item>
    </el-form>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="dialogVisible = false">取消</el-button>
        <el-button type="primary" @click="dialogVisible = false">确认</el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { useUserStore } from "@/stores/modules/user";
// import { url } from "@/utils/index"

const { userInfo } = useUserStore();
const dialogVisible = ref(false);
const openDialog = () => {
  dialogVisible.value = true;
};

defineExpose({ openDialog });
</script>
